<#include "../common/layout.ftl"/>
<@layout>
<script charset="utf-8" src="/kindeditor/kindeditor.js"></script>
<script charset="gbk" src="/kindeditor/lang/zh_CN.js"></script>
<script charset="utf-8"	src="/kindeditor/plugins/code/prettify.js"></script>
<script type="text/javascript">
		var editor = null;
	KindEditor.ready(function(K) {
		editor = K.create('textarea[name="content"]', {
			cssPath : '/kindeditor/plugins/code/prettify.css',
			uploadJson : '/kindeditor/jsp/upload_json.jsp',
			fileManagerJson : '/kindeditor/jsp/file_manager_json.jsp',
			allowFileManager : true,
			
			items : [ 'source', '|', 'undo', 'redo', '|', 'preview', 'print',
					'template', 'code', 'cut', 'copy', 'paste', 'plainpaste',
					'wordpaste', '|', 'justifyleft', 'justifycenter',
					'justifyright', 'justifyfull', 'insertorderedlist',
					'insertunorderedlist', 'indent', 'outdent', 'subscript',
					'superscript', 'clearhtml', 'quickformat', 'selectall',
					'|', 'fullscreen', '/', 'formatblock', 'fontname',
					'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
					'italic', 'underline', 'strikethrough', 'lineheight',
					'removeformat', '|', 'image', 'multiimage', 'flash',
					'media', 'insertfile', 'table', 'hr', 'emoticons',
					'baidumap', 'pagebreak', 'anchor', 'link', 'unlink', '|',
					'material' ]
		});
	});
	KindEditor.lang({
		material : '添加公告'
	});
</script>
<div class="well">
	<span class="label label-success">添加公告</span>
	<form id="form1" class="well form-horizontal" action="save"  method="post">
       <div class="control-group">
        <label class="control-label" for="focusedInput">标题：</label>
        <div class="controls" >
          <input class="input-xlarge focused" name="notice.title" id="title" type="text"  style="height: 26"  >
        </div>
      </div>
      <div class="control-group">
        <label class="control-label" for="focusedInput">来源：</label>
        <div class="controls" >
          <input class="input-xlarge focused" name="notice.source" id="source" type="text"  style="height: 26"  >
        </div>
      </div>
       <div class="control-group" >
        <label class="control-label" for="focusedInput">内容：</label>
        <div class="controls"  >
          <textarea  name="notice.content" id="content" style="width: 90%; height: 400px;">
          </textarea>
        </div>
      </div>
      
      <div class="form-actions">
        <button type="submit" class="btn btn-primary" >确 定</button>
        <button type="reset" class="btn">重 置</button>
      </div>
  </form>
  </div>
 <script>
	$(function() { 
     $("#form1").validity(function() {
         $("#title").require();
         $("#source").require();
         $("#content").require();
     });
     
 }); 
</script>
</@layout>